1. Field of the Invention
The present invention relates to a technique for inputting a plurality of data and a method for calculating these data into a data structure as a table, and outputting calculated results.
This application is based on Patent Application No. Hei 9-194821 filed in Japan, the contents of which are incorporated herein by reference.
2. Description of the Related Art
Conventional data calculators can be classified into two types: a spread-sheet type in which a working table is managed so as to maintain dependence relationships between data by editing the values of cells in the table and by editing a method for calculating values of the cells based on positional information of the cells, and a non-limited processing type in which calculation of data structures is possible by editing the data structures and inputting a calculation method but dependence relationships are not maintained.
The former spread-sheet type calculator comprises a cell data editing section for realizing input, display, and revising operations of a working table and values of the cells in the working table; a calculation method editing section for realizing input, display, and revising operations of a method for performing a calculation between cells by using positional information of the cells; a managing section for managing a cell network in which the cells are regarded as nodes and the calculation method is regarded as an ark, and for maintaining dependence relationships between data structures as inputs or outputs of calculation; and a calculating section for performing calculations between the cells.
When cell data and a calculation method are respectively provided from the cell data editing section and the calculation method editing section to the managing section, the managing section calculates the data of a cell as an output of a calculation according to the calculation method by using the newest data of a cell as an input of the calculation, and displays a calculated result via the cell data editing section.
FIG. 17 is a block diagram showing a structural example of conventional spread-sheet type data calculator 201. As shown in the figure, data calculator 201 consists of cell data editing section 202, calculation method editing section 203, managing section 204, calculating section 205, and working-table/cell-network storage section 206. The working-table/cell-network storage section 206 stores a cell network and a working table, and is managed by the managing section 204.
The cell data editing section 202 realizes a display operation (see arrow 2A in FIG. 17), an input operation (see arrow 2B), and a revising operation (see arrow 2C) with respect to cell data, and if cell data are changed by an input or revising operation, the changed cell data is communicated to managing section 204 (see arrow 2H).
When a change of cell data is communicated (see arrow 2H), the managing section 204 updates the cell network stored in the cell network storage section (see arrow 2M). After that, the managing section detects cells which must be recalculated, a necessary calculation method, and the data of the cells used for calculation, by referring to the cell network (see arrow 2L), and provides detected information to calculating section 205 as recalculation information (see arrow 2K).
In calculating section 205, necessary calculations are performed according to the recalculation information. Cell data as calculated results are given to managing section 204 (see arrow 2J), and managing section 204 informs cell data editing section 202 of the cell data (see arrow 2G). In this way, cell data editing section 202 displays the new cell data in a display section (not shown) (see arrow 2A).
The calculation method editing section 203 realizes a display operation (see arrow 2D), an input operation (see arrow 2E), and a revising operation (see arrow 2F). When the calculation method is changed according to an input or revising operation, the new calculation method is communicated to managing section 204 (see arrow 2I).
In this way, managing section 204 updates the cell network (see arrow 2M), and then detects cells which must be recalculated, a necessary calculation method, and data of the cells used for calculation, by referring to the cell network (see arrow 2L), and provides detected information to calculating section 205 as recalculation information (see arrow 2K).
In calculating section 205, necessary calculations are performed according to the recalculation information. Cell data as calculated results are given to managing section 204 (see arrow 2J), and managing section 204 informs cell data editing section 202 of the cell data (see arrow 2G). In this way, cell data editing section 202 displays the new cell data in the display section (see arrow 2A).
FIG. 18 is a diagram showing an example of the display screen in the conventional spread-sheet type data calculator as shown in FIG. 17. This example relates to two branch offices (Tokyo and Osaka) of a company and shows results of calculations in which sales volume per an employee is calculated for each branch office based on data relating to the sales volume and the number of employees in both branch offices for the present and previous year.
In the display screen as shown in FIG. 18, selected cell display label 401 for indicating a cell for which data or a calculation method is edited; selected cell edit entry 402 for performing input, edit, or display of cell data or a calculation method; and working table 411 are displayed.
The working table 411 has a structure of a two-dimensional array of cells, and comprises line headers 404, column headers 403, and scroll bars 408 and 410. A user can select a cell (i.e., selected cell) 409 to be edited by using a pointing device like a mouse, a cursor key of a keyboard, or the like. A display effect like a shade is added to selected cell 409 so as to be identifiable at a glance. When each of tables 405-407 is made using an area of working table 411, an optional function which modifies the display of the ruled lines is used so as to make the structure of the tables easily recognizable.
The index indicating coordinate values of selected cell 409 is always displayed in selected cell display label 401. A user can edit the table by selecting a cell and editing a value or a formula relating to the cell via the selected cell edit entry 402. In the example of FIG. 18, cell 409 (the position thereof is "D14")is selected, and formula "=D4/D9" is input. In this way, calculated result "6" is displayed in selected cell 409.
Here, the formula "=D4/D9" indicates that selected cell 409 is set to be a value obtained by dividing the value of cell D4 by the value of cell D9. The cells D4 and D9 appearing in this formula can be designated using the relative coordinates with respect to the selected cell 409. In this example, cell D4 indicates a cell existing in the same column as selected cell 409 and ten lines above the line of cell 409, while cell D9 indicates a cell existing in the same column as selected cell 409 and five lines above the line of cell 409. That is, the calculation method of the value of cell D14 can be defined using relative coordinates such as "dividing the value of a cell ten lines above the target cell by the value of a cell five lines above the target cell". In this way, the value of each cell of table 407 of the sales volume per an employee, the third table in FIG. 18, (that is, the values of the cells belonging to a rectangular area defined by three horizontal cells and three vertical cells, specified by two corner cells C13 and E15) can be calculated using the same calculation method. Therefore, by copying the relevant calculation method from a cell to another cell in turn, calculation methods used for these nine cells can easily be designated.
In the spread-sheet type calculator, in order to maintain dependence relationships based on the designated calculation methods, when the value of a cell is changed, the values of other cells in a dependence relationship with the changed cell are automatically recalculated and changed. For example, in the case shown in FIG. 18, when the value of cell D4 or cell D9 is changed, the value of sell D14 is automatically recalculated and changed according to the formula "=D4/D9".
On the other hand, the non-restricted processing type calculator consists of a data structure editing section for realizing input, display, and revising operations with respect to a data structure such as a list, table, graph, or the like; a calculation method input section for realizing an input operation of a method for calculating a new data structure based on the existing data structure; a managing section for managing a list of data structures; and a calculating section for performing a calculation relating to a relevant data structure. If cell data or a calculation method is provided from the data structure editing section or the calculation method editing section to the managing section, a data structure is calculated via the calculating section according to the present data structure and calculation method, and a calculated result is displayed by the data structure editing section.
FIG. 19 is a block diagram showing an example of the conventional non-restricted processing type data calculator (301). As shown in the figure, data calculator 301 consists of data structure editing section 302, calculation method input section 303, managing section 304, calculating section 305, and data structure list storage section 306 which is managed by the managing section 304.
The data structure editing section 302 realizes a display operation (see arrow 3A), an input operation (see arrow 3A), and a revising operation (see arrow 3C) with respect to a data structure such as a list, table, graph, or the like. When the data structure is changed according to the input or revising operation, the data structure editing section 302 informs managing section 304 of the changed data structure (see arrow 3F).
When the managing section 304 is informed that the data was changed (see arrow 3F), the managing section updates the content of data structure storage section 306 but does not perform a recalculation or the like.
A calculation method for calculating a new data structure from the data structure which was already established is input via the calculation method input section 303 (see arrow 3D), and the input section 303 communicates the input calculation method to managing section 304 (see arrow 3G). In this way, managing section 304 acquires the present data structure as an input for a relevant calculation from data structure list storage section 306 (see arrow 3J), and provides it to calculating section 305 together with a calculation method (see arrow 3I).
In the calculating section 305, the relevant calculation is performed based on the given data structure and calculation method, and the data structure as a calculated result is transferred to managing section 304 (see arrow 3H). The managing section 304 registers the data structure, provided from the calculating section 305, to data structure list storage section 306 (see arrow 3K), and simultaneously communicates the data structure to data structure editing section 302 (see arrow 3E). The data structure editing section 302 displays the new data structure in a display device (not shown).
FIG. 20 is a diagram showing an example of the display screen in data calculator 301 as shown in FIG. 19. This example relates to data for two branch offices (Tokyo and Osaka) of a company and shows results of calculations in which sales volume per an employee is calculated for each branch office, based on data relating to the sales volume and the number of employees in both branch offices for the present and previous year, as in the example shown in FIG. 18.
The display screen as shown in FIG. 20 includes parts such as menu 501 by which a user selects the kind of calculation method of the data structure, name entry 502 for designating a name of a new data structure, and each data structure (or table) 504-506. These data structures are displayed in a format of the multi-window system. Here, "SALES VOLUME" table 504 and "NUMBER OF EMPLOYEES" table 505 are data structures which a user has already input.
The user made a new table 506 (i.e., "VOLUME/EMPLOYEES")by selecting the item "MAKE NEW TABLE" in the menu. The used calculation method is designated by a formula "=SALES VOLUME/NUMBER OF EMPLOYEES". This method is for generating a table having the same headers as the tables 504 (the sales volume) and 505 (the number of employees). The value of each target cell in generated table 506 is a result obtained by dividing the value of a cell in table 504 (the sales volume) at a position corresponding to the target cell by the value of a cell of table 505 (the number of employees) also at a position corresponding to the target cell. This calculation method is shown in an upper area 507 in table 506 ("SALES VOLUME/NUMBER OF EMPLOYEES").
In the above-described conventional spread-sheet type data calculator, a relationship between plural data can be indicated only based on positional relationships of the cells in the working table. Therefore, it is difficult to indicate complicated relationships between various data. This problem will be explained in detail with reference to an example shown in FIG. 21.
FIG. 21 shows an example of the display screen in the spread-sheet type data calculator shown in FIG. 17, as the example shown in FIG. 18. In the example of FIG. 21, summary table 703 is calculated based on "SALES VOLUME" table 701 and "NUMBER OF EMPLOYEES" table 702, as in the example shown in FIG. 18. The arrows in FIG. 21 indicate relationships between target cells of table 701 of the sales volume and of table 702 of the number of employees and corresponding cells of table 703 which are set to be the same value of each target cell. For example, the formula for calculating cell D10 is "=C3", and the cell D10 is set to be the same value as that of cell C3 of table 701 of the sales volume. In the defined formulas for calculating the eight cells in summary table 703, each formula must independently refer to corresponding cells of table 701 of the sales volume and table 702 of the number of employees. Therefore, a simple method such as copying a formula as shown in the example of FIG. 18 cannot be used in this case. This is because the structure of desired table 703 differs from those of existing table 701 of the sales volume and table 702 of the number of employees; therefore, the structure of table 703 cannot be simply represented only using positional relationships between the cells.
In the spread-sheet type data calculator, the dependence relationships are maintained based on the used calculation methods of the cells. Therefore, when the -value of a cell is changed, the values of other cells which must also be changed are automatically changed. For example, in FIG. 18, if the value of the sales volume of the previous year for the Tokyo branch office (i.e., cell C3) is changed, the values of cells E3, C5, E5, C13, E13, C15, and E15 are automatically changed in accordance with the above change. However, if it is necessary to newly add data for the Nagoya branch office, or to also add data of the year before the previous year, then the user must carry out a major revision of the data.
Additionally, in the conventional spread-sheet type data calculator, as shown in FIG. 18, three tables such as "SALES VOLUME" table 405, "NUMBER OF EMPLOYEES" table 406 and "SALES VOLUME/NUMBER OF EMPLOYEES" table 407 must be arranged in a working table 411. Therefore, it is inconvenient if it is necessary to calculate many tables and to separately display or print the tables.
As explained above, in the conventional spread-sheet type data calculator, no method other than the method in which formulas are determined based on positional relationships between the cells in the working table can be used; thus, it is difficult to calculate a new table from existing tables when the new table has no corresponding positional relationship with the existing tables. Additionally, it is inconvenient when it is necessary to calculate many tables and to separately display or print the tables, and a big revision is necessary when a data structure itself must be changed.
On the other hand, as the conventional non-restricted processing type data calculator has no structure for maintaining dependence relationships based on cells or calculation methods of the table, the table as calculated results must be recalculated according to a change of the value of a cell in which original data is stored or a change of the structure of the table. For example, when the sales volume of the previous year for the Tokyo branch office is changed in the example shown in FIG. 20, table 506 must be deleted and then the same calculations must be performed again. Also, when a new branch office or a new target year is added to each of table 504 of the sales volumes and table 505 of the number of employees, similar recalculations must be performed. As described above, the conventional non-restricted processing type data calculator has a problem in which recalculation is necessary according to a change of the value of a cell or of the structure of the table.